// Copyright 2017 JanusGraph Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.janusgraph.graphdb.types.system;

import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.janusgraph.core.PropertyKey;
import org.janusgraph.core.Connection;
import org.janusgraph.graphdb.internal.InternalVertexLabel;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Matthias Broecheler (me@matthiasb.com)
 */
public class BaseVertexLabel extends EmptyVertex implements InternalVertexLabel {

    public static final BaseVertexLabel DEFAULT_VERTEXLABEL = new BaseVertexLabel(Vertex.DEFAULT_LABEL);

    private final String name;

    public BaseVertexLabel(String name) {
        this.name = name;
    }

    @Override
    public boolean isPartitioned() {
        return false;
    }

    @Override
    public boolean isStatic() {
        return false;
    }

    @Override
    public String name() {
        return name;
    }

    @Override
    public boolean hasDefaultConfiguration() {
        return true;
    }

    @Override
    public int getTTL() {
        return 0;
    }

    @Override
    public String toString() {
        return name();
    }

    @Override
    public Collection<PropertyKey> mappedProperties() {
        return new ArrayList<>();
    }

    @Override
    public Collection<Connection> mappedConnections() {
        return new ArrayList<>();
    }
}
